package org.hibernate.criterion;


public class Functions {

	/**
	 * Apply an "length" function to the named property
	 * @param propertyName
	 * @return Criterion
	 */
	public static SimpleFunction length(String propertyName) {
		SimpleFunction out=new SimpleFunction(propertyName, "length");
		assert(out!=null);
		return out;
	}
	
	/**
	 * Apply an "length" function to the named property
	 * @param propertyName
	 * @return Criterion
	 */
	public static SimpleFunction length(SimpleFunction nestedFunction) {
		return new SimpleFunction(nestedFunction, "length");
	}
	
	/**
	 * Apply an "trim" function to the named property
	 * @param propertyName
	 * @return Criterion
	 */
	public static SimpleFunction trim(String propertyName) {
		return new SimpleFunction(propertyName, "trim");
	}
	
	/**
	 * Apply an "trim" function to the named property
	 * @param propertyName
	 * @return Criterion
	 */
	public static SimpleFunction trim(SimpleFunction nestedFunction) {
		return new SimpleFunction(nestedFunction, "trim");
	}
	
	
	
	
	
	
}
